package com.mtf.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mtf.entity.MtfStock;

/**
 * @Description: mtf_stock
 * @Author: jeecg-boot
 * @Date:   2023-11-02
 * @Version: V1.0
 */
public interface IMtfStockService extends IService<MtfStock> {

    /**
     * @Description: 根据商品标识检验库存数量
     * @param productIdentity
     * @param num
     * @return boolean
     */
    boolean checkStockByProductIdentity(String productIdentity, Integer num);

    /**
     * @Description: 根据商品标识扣减库存
     * @param productIdentity
     * @param num
     * @return void
     */
    void substractStockByProductIdentity(String productIdentity, Integer num);
}
